package com.imust;


import com.imust.config.Myconfig;
import com.imust.pojo.User;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;

//SpringBootApplication:标注这个类是一个springboot的应用
@SpringBootApplication
public class Springboot01Application {

	public static void main(String[] args) {
		//springboot
		ApplicationContext run = SpringApplication.run(Springboot01Application.class, args);

		String[] beanDefinitionNames = run.getBeanDefinitionNames();

		/*Myconfig bean = run.getBean(Myconfig.class);
		System.out.println(bean);

		User user = bean.user01();
		User user1 = bean.user01();

		System.out.println(user == user1);

		boolean tom = run.containsBean("tom");
		boolean user01 = run.containsBean("user01");
		System.out.println("user01"+user01);
		System.out.println("tom"+tom);*/

	}

}
